package com.alili_tv.system.service;

import com.alili_tv.system.entity.VideoFavorite;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 收藏的视频 服务类
 * </p>
 *
 * @author baomidou
 * @since 2023-03-17
 */
public interface VideoFavoriteService extends IService<VideoFavorite> {

    /**
     * 判断用户是否收藏视频
     * @param id
     * @param userId
     * @return
     */
    boolean isCollect(Long id, Long userId);

    /**
     * 获取视频的收藏数
     * @param id
     * @return
     */
    Long countByVideoId(Long id);
}
